curl --request GET \
--url https://api.example.com/api/pedidos/{pedidoId}/detalles{
"200": {},
"401": {},
"403": {},
"404": {},
"detalles": [
{
"detalle_id": 123,
"producto_id": 123,
"nombre": "<string>",
"cantidad": 123,
"precioUnitario": 123,
"subtotal": 123
}
]
}Retrieve all line items (details) for a specific order
curl --request GET \
--url https://api.example.com/api/pedidos/{pedidoId}/detalles{
"200": {},
"401": {},
"403": {},
"404": {},
"detalles": [
{
"detalle_id": 123,
"producto_id": 123,
"nombre": "<string>",
"cantidad": 123,
"precioUnitario": 123,
"subtotal": 123
}
]
}Show Order Detail Object
curl -X GET "http://localhost:8080/api/pedidos/123/detalles" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
const response = await fetch('http://localhost:8080/api/pedidos/123/detalles', {
headers: {
'Authorization': `Bearer ${token}`
}
});
const details = await response.json();
import requests
headers = {
'Authorization': f'Bearer {token}'
}
response = requests.get(
'http://localhost:8080/api/pedidos/123/detalles',
headers=headers
)
details = response.json()
[
{
"detalle_id": 1,
"producto_id": 5,
"nombre": "Sofá Klippan 2 plazas",
"cantidad": 1,
"precioUnitario": 299.00,
"subtotal": 299.00
},
{
"detalle_id": 2,
"producto_id": 12,
"nombre": "Mesa de centro Lack",
"cantidad": 2,
"precioUnitario": 49.99,
"subtotal": 99.98
}
]